home *** CD-ROM | disk | FTP | other *** search
- Path: news.london.sinet.slb.com!news
- From: Laurent Darton <darton@macon.wm.slb.com>
- Newsgroups: comp.lang.c
- Subject: Macro and printf
- Date: Wed, 03 Apr 1996 18:36:12 -0800
- Organization: Schlumberger SINet, London, England
- Message-ID: <3163359C.A47@macon.wm.slb.com>
- NNTP-Posting-Host: macon14.macon.wm.slb.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Hi everyall
-
- I would like to define a macro "myprintf" which does (for the moment only
- a sprintf) Here is an example :
-
- #define myprintf(object) sprintf(fd,object);
-
- the problem is when I want to put an argument %s,%d, with parameter, my
- macro cannot manage that, with only a single string it works but never
- with something complex. I suppose I have to use # and ## symbol but I
- don't know how to do that.
- Any help will be appreciated..
- Thanks in advance
- Laurent
-